package org.ourgrid.broker.business.scheduler.workqueue.xmlcreator;



public class XMLCreatorFactory {

	
	private static XMLCreatorFactory instance;
	
	private XMLCreatorFactory() {
	}
	
	public static XMLCreatorFactory getInstance() {
		if (instance == null) {
			instance = new XMLCreatorFactory();
		}
		return instance;
	}
	
	public <U extends XMLCreatorIF> U getXMLCreator(Class<U> creator) {
		
		try {
			return creator.newInstance();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		
		return null;
	}
}
